package demo2;

import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

/**
 * @Component 该注解默认为bean
 * @Repository 该注解表示为持久层bean
 * @Service 该注解表示为业务层bean
 * @Controller 该注解表示为控制层bean
 */
@Controller
public class User {
    public void sayHello(){
        System.out.println("hello world");
    }
}
